<?php
/**
 * CreateTime: 2023/11/15 15:31
 * User:LinQ
 */
namespace App\Http\Requests\Login;

use App\Http\Requests\BasicFormRequests;

class LoginRequest extends BasicFormRequests
{
    protected $rule =[
        'account' => 'required',
        'password' => 'required',
        'sign' => 'required'
    ];

    public function __construct(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null)
    {
        $this->message = [
            'account.required'=> trans('message.request_required',[
                'name' => trans('key.account')
            ]),
            'password.required'=> trans('message.request_required',[
                'name'  => trans('key.password')
            ]),
            'sign.required'=> trans('message.request_required',[
                'name'  => trans('key.sign')
            ]),
        ];
        parent::__construct($query, $request, $attributes, $cookies, $files, $server, $content);
    }


    protected $scene = [
        'login' => ['account','password','sign'],
        'get_pu_key' => ['account','sign']
    ];

}
